<template>
  <div class="tabTopPage">
    <div class="part1">
      <div class="part11" @click="jumpBack">
        <img class="part1-img" src="../../assets/img/h11.png" alt="" />
      </div>
      <div class="part22" @click="jumpHome">
        <img class="part1-img" src="../../assets/img/h10.png" alt="" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    type: {
      type: String,
      default: '',
    },
  },
  methods: {
    jumpBack() {
      if (this.type == '1') {
        this.$emit('goBack')
      } else {
        uni.navigateBack()
      }
    },
    jumpHome() {
      location.href = '/'
      // uni.navigateTo({
      //   url: '/',
      // })
    },
  },
}
</script>

<style lang="scss">
.tabTopPage {
  .part11,
  .part22 {
    position: fixed;
    top: 10rpx;
    width: 70rpx;
    height: 70rpx;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
  }
  .part11 {
    left: 20rpx;
  }
  .part22 {
    right: 20rpx;
  }
  .part1-img {
    width: 60rpx;
    height: 60rpx;
  }
}
</style>
